<script setup lang="ts">
import { onMounted } from "vue";
import YHearder from "./components/YHearder.vue";
import YTab from "./components/YTab.vue";
import YTabCol from "./components/YTabCol.vue";
import { useCapital } from "@/stores/capital";
import { useRoute } from "vue-router";

const capital = useCapital();
// const query: any = useRoute().query;
const route = useRoute();

onMounted(async () => {
    console.log("params ===", route);
    console.log(route.params.id, "query");
    await capital.init(route.params.id + "");
    await capital.loadCapitals();
});
</script>
<template>
    <div class="browser">
        <!-- <h1>浏览器</h1> -->
        <div class="bgcolor">
            <YHearder></YHearder>
            <YTab></YTab>
        </div>
        <br />
        <div class="bgcolor pt-2 mb-7">
            <YTabCol></YTabCol>
        </div>
    </div>
</template>
<style lang="scss">
.clever {
    height: auto;
}

.browser {
    margin-inline: 30px;
}

.bgcolor {
    background-color: #1d2125;
}
</style>
